/*
 * mt9v03x.h
 *
 *  Created on: 2025年3月12日
 *      Author: shuai
 */

#ifndef _CODE_MT9V03X_H_
#define _CODE_MT9V03X_H_

#include "zf_common_headfile.h"


#define SEARCH_WH_DEN 6          // 搜索白色长度的时候 抽取的列间隔
#define JUMP_NUM 5               // 对比对计算时，两点间隔距离
#define SEARCH_MIN 5             // 搜索最小值,数值要与JUMP_NUM相同
#define SEARCH_MAX MT9V03X_W - 2 - JUMP_NUM //(COL-1)-1-JUMP_NUM //搜索最大

extern int16 l_border[MT9V03X_H];
extern int16 r_border[MT9V03X_H];
extern int16 position;
extern int16 position_old;
extern uint8 zhongdian_flag;
extern uint8 victory_flag;

extern int8  l_effect_flag[MT9V03X_H];
extern int8  r_effect_flag[MT9V03X_H];

extern int16 zhidao_flag;
extern uint8_t cross_flag;
extern int16_t cross_distance;
extern int r_knee_point1;
extern int r_knee_point2;
extern int l_knee_point1;
extern int l_knee_point2;

extern uint8 onece_flag;
extern int8  flag_obstacle;
extern int16 obstacle_distance;
extern int16 width1;
extern int16 width2;
void search_line(void);///搜线
void calc_corner(void);//计算偏差
void obstacle(void);
#endif /* CODE_MT9V03X_H_ */
